package io.renren.config;

<<<<<<< HEAD
=======
import org.apache.commons.lang.StringUtils;
>>>>>>> c63fa0f06289410c88b9bab6c5a59e2591894c33
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @author: gxz gongxuanzhang@foxmail.com
 **/
public class MongoCondition implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
<<<<<<< HEAD
        String database = context.getEnvironment().getProperty("xxsign.database");
=======
        String database = context.getEnvironment().getProperty("renren.database");
>>>>>>> c63fa0f06289410c88b9bab6c5a59e2591894c33
        return "mongodb".equalsIgnoreCase(database);
    }
}
